package com.isyscore.constant;

import lombok.Getter;

/**
 * @Author: liuxq@isyscore.com
 * @Date: 2021-04-21 11:16:13
 * @Description: 返回状态枚举
 */
public enum ResponseCode {
    // 0表示成功
    SUCCESS(0, "成功"),
    UN_AUTHORIZATION(403, "未授权"),
    NOT_FOUND(404, "资源不存在"),
    UN_LOGIN(401, "未登录"),
    USER_NOT_FOUND(501, "用户名不存在"),
    USER_LOCK(502, "用户被冻结"),
    PASSWORD_ERROR(503, "用户名密码不正确"),
    FAIL(1, "失败");


    ResponseCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Getter
    private Integer code;

    @Getter
    private String message;
}
